<extend name="Public/base"/>
<block name="content">
<h3>菜单管理</h3>
<div class="panel panel-default">
	<div class="panel-heading"><{:isset($info['id'])?'编辑':'新增'}>后台菜单</div>
 	<div class="panel-body">
	<form action="<{:U()}>" method="post" class="form-horizontal">
		<div class="form-group">
			<label class="col-sm-2 control-label">标题</label>
			<div class="col-sm-2">
    			<input type="text" class="form-control" name="title" value="<{$info.title|default=''}>">		 		
		 	</div>
		 	<p class="help-block">用于后台显示的配置标题</p>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">排序</label>
			<div class="col-sm-2">
    			<input type="text" class="form-control" name="sort" value="<{$info.sort|default=0}>">				
			</div>
			<p class="help-block">用于分组显示的顺序</p>
		</div>
		<div class="form-group">
			<label class=" col-sm-2  control-label">链接</label>
			<div class="col-sm-2">
    			<input type="text" class="form-control" name="url" value="<{$info.url|default=''}>">				
			</div>
			<p class="help-block">U函数解析的URL或者外链</p>
		</div>
		<div class="form-group">
			<label class=" col-sm-2  control-label">上级菜单</label>
			<div class="col-sm-2">
    			<select name="pid" class="form-control">
        		<volist name="Menus" id="menu">
            		<option value="<{$menu.id}>"><{$menu.title_show}></option>
        		</volist>
    			</select>   			
			</div>
			<p class="help-block">所属的上级菜单</p>
		</div>
		<div class="form-group">
			<label class="col-sm-2  control-label">分组</label>
			<div class="col-sm-2">
    			<input type="text" class="form-control" name="group" value="<{$info.group|default=''}>">				
			</div>
			<p class="help-block">用于左侧分组二级菜单</p>
		</div>
		<div class="form-group">
 			<label class="col-sm-2 control-label">是否隐藏<span class="check-tips"></span></label>           			
			<div class="col-sm-2">	
				<input class="hide" name="hide" value="<{$info.hide |default='0'}>">
				<if condition="$info.hide == 1">
				<div class="switch-wrapper">
					<span class="switch-enable selected">是</span>
					<span class="switch-disable">否</span>
				</div>
				<else/>
				<div  class="switch-wrapper">
					<span class="switch-enable">是</span>
					<span class="switch-disable selected">否</span>	
				</div>
				</if>	
			</div>
		</div>
		<!--div class="form-group">
			<label class="control-label">仅开发者模式可见<span class="check-tips"></span></label>
			<div class="col-sm-2">
    			<input class="hide" name="is_dev" value="<{$info.is_dev |default='0'}>">
				<if condition="$info.is_dev == 1">
				<div class="switch-wrapper">
					<span class="switch-enable selected">是</span>
					<span class="switch-disable">否</span>
				</div>
				<else/>
				<div  class="switch-wrapper">
					<span class="switch-enable">是</span>
					<span class="switch-disable selected">否</span>	
				</div>
				</if>
			</div>
		</div-->
		<div class="form-group">
			<label class="col-sm-2 control-label">说明</label>
			<div class="col-sm-2">
    			<input type="text" class="form-control" name="tip" value="<{$info.tip|default=''}>">				
			</div>
			<p class="help-block">菜单详细说明</p>
		</div>
		
		<div class="form-group">
			<input type="hidden" name="id" value="<{$info.id|default=''}>">      		
        	<div class="col-sm-4 col-sm-offset-2">
            	<button class="btn btn-default" type="button" onclick="javascript:history.back(-1);return false;">取消</button>
            	<button class="btn btn-primary" type="submit">保存</button>
        	</div>
        </div>
    </form>
	</div>
</div>													

</block>

<block name="script">
    <script type="text/javascript">
        $("[name='pid']").val("<{$info.pid|default = 0}>");
        highlight_subnav("<{:U('Config/group')}>","<{:U('Menu/index')}>");
    </script>
</block>